package com.castle.fortress.admin.flowable.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 流程应用统计实体类
 * @author castle
 */
@Data
public class AppAnalyzeDto {
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(
            value = "id",
            type = IdType.ASSIGN_ID
    )
    private Long id;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("流程模板id")
    private Long flowId;
    @ApiModelProperty("流程申请人")
    private String _castle_apply_user;
    @ApiModelProperty("流程申请人姓名")
    private String _castle_apply_user_name;
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @ApiModelProperty("申请时间")
    private Date _castle_apply_date;
    @ApiModelProperty("申请人所在部门")
    private String _castle_apply_dept;
    @ApiModelProperty("申请人所有父级部门")
    private String _castle_apply_dept_parents;
    @ApiModelProperty("申请人所处职位")
    private String _castle_apply_post;
    @ApiModelProperty("审批状态")
    private String _castle_approve_status;

    @ApiModelProperty("流程实例ID")
    private String _castle_process_instance_id;
    @ApiModelProperty("流程部署版本号")
    private String _castle_process_engine_version;
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @ApiModelProperty("审批时间")
    private Date _castle_approve_date;
    /**
     * 业务数据
     */
    @ApiModelProperty("业务数据")
    private List<Map<String,Object>> bizDatas;

    @ApiModelProperty("请假类型")
    private String _castle_leave_type;
    @ApiModelProperty("请假开始时间")
    private String _castle_start_time;
    @ApiModelProperty("请假结束时间")
    private String _castle_end_time;
    @ApiModelProperty("请假总时长")
    private String _castle_leave_duration;
}
